using Gtk;
using Gdk;

namespace Meridian.Content {
	
	public class Tab<W> : Widget {
		
		protected TabLabel label;
		protected Book<W, Tab<W>> book;
		protected W content;
		protected ScrolledWindow scrolled_window;
				
		public void connect_close_button () {
			this.label.get_close_button ().clicked.connect(this.close_tab);
		}
		
		private void close_tab () {
			book.close_tab(this);
		}
			
		public W get_content () {
			return this.content;
		}
			
		public TabLabel get_label () {
			return this.label;
		}
		
		public ScrolledWindow get_scrolled_window () {
			return this.scrolled_window;
		}
		
		public void set_title (string title) {
		    this.label.set_title (title);
	    }
	    
	    public void set_icon (Pixbuf pixbuf) {
		    this.label.set_icon (pixbuf);
	    }
		
	}
}
